Image processing apparatus, image processing method, image processing program, and storage medium

ABSTRACT

An image processing apparatus is configured to apply correction processing to image data having sharpness varying depending on an alignment direction of pixels. The image processing apparatus detects a feature quantity in an edge direction of the image data. The image processing apparatus sets an intensity of the correction processing based on correction intensity which is predetermined based on the sharpness varying depending on the alignment direction of the pixels, according to the detected feature quantity in the edge direction of the image data.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to an image processing apparatusconfigured to apply correction processing to an image, an imageprocessing method, an image processing program, and a storage mediumstoring the program.

2. Description of the Related Art

Copying machines are equipped with a scanner that optically reads adocument image and a printer that prints the read image on a paper orother recording medium. However, an edge of an optically read imagetends to be dull compared to an edge of the original document.Therefore, when the printer performs printing based on the image read bythe scanner, a printed image on a recording medium tends to lacksharpness.

In order to enhance sharpness, it is useful to apply edge intensifyingprocessing to image data read by a scanner. However, the edgeintensifying processing may intensify moire appearance when a halftonedot image is read. To address this problem, a segmentation technique maybe applied to image data read by a scanner.

A conventional segmentation technique involves separating a read imageinto a character region and a halftone dot region, and applying edgeintensifying processing to the character region and applying smoothingprocessing to the halftone dot region. As a result, the segmentationtechnique may improve the sharpness of characters and reduces the moireappearance.

However, if the separated regions in the segmentation is inaccurate,characters may be erroneously subjected to smoothing processing while ahalftone dot image may be subjected to edge intensifying processing. Asa result, image quality may deteriorate.

Furthermore, when segmentation accuracy is insufficient, characters maybe determined as partly belonging to a character region and partlybelonging to a halftone dot region. This causes undesirable switchingbetween the edge intensifying processing and the smoothing processing.As a result of segmentation inaccuracy, the image quality may greatlydeteriorate. To address the above-described problems, the followingtechniques have been proposed.

As discussed in Japanese Patent No. 03099354 (first technique), it maybe useful to continuously set an edge intensifying amount depending onan edge amount. The first technique can adaptively realize edgeintensification depending on the edge amount and reduce imagedeterioration caused by the above-described switching, although themoire appearance of a halftone dot image may be intensified.

Furthermore, an edge intensifying technique using a filter isconventionally known as a technique capable of intensifying characters.

As discussed in Japanese Patent No. 02620368 (second technique),replacement processing can be applied to an edge region having moderatedensity that appear in a reading operation. According to the secondtechnique, for the purpose of obtaining a sharp edge, a moderate edgeregion is replaced with a solid region of a character or a backgroundregion.

However, the replacement processing for completely replacing a moderateedge region with a solid region of a character or a background regionmay cause jaggy image (i.e., an image having a non-smooth or zigzag edgeportion). The following technique has been proposed to eliminate thejaggy image.

As discussed in Japanese Patent Application Laid-Open No. 11-127353(third technique), smoothing processing may be performed to reduce thepossibility of generating jaggy images. The third technique includesdetecting where a jaggy image may appear and converting the image datain the detected region into data having high resolution and a multiplevalue.

A scanner for a copying machine may include a line sensor having readingelements aligned in a main-scanning direction. Such a conventionalscanner can read an image of a document when the line sensor shifts in asub-scanning direction relative to the document.

A conventional sensor may have reading resolution in the main-scanningdirection which is different from reading resolution in the sub-scanningdirection.

In general, the main-scanning resolution of a line sensor is dependenton the alignment intervals of reading elements. If a scanner can read adocument while it causes a relative shifting in the sub-scanningdirection with the resolution different from the main-scanningresolution, the reading resolution in the main-scanning direction isdifferent from the reading resolution in the sub-scanning direction.

A copying machine, using a scanner having the main-scanning resolutiondifferent from the sub-scanning resolution, reads an image having thereading resolution in the sub-scanning direction higher than the readingresolution in the main-scanning direction, and converts themain-scanning resolution into the sub-scanning resolution when the readimage is output.

The copying machine can apply edge intensifying processing to an imagehaving the main-scanning resolution different from the sub-scanningresolution having been read by the above-described scanner. Then, thecopying machine can convert the main-scanning resolution into thesub-scanning resolution when the read image is output.

In this case, to convert the resolution in the main-scanning direction(i.e., low resolution reading direction) into the resolution in thesub-scanning direction (i.e., high resolution reading direction), on theimage that was subjected to the edge intensifying processing, thecopying machine performs the conversion so as to increase the number ofpixels aligned in the main-scanning direction. As a result, a jaggy edgeportion of a character or a line segment resulting from the edgeintensifying processing may expand in the sub-scanning direction.

Furthermore, there is a scanner having MTF (Modulation TransferFunction) varying depending on the direction due to lenscharacteristics. The defocused state and sharpness are depending on thedirection, and a jaggy image region may appear if the replacementprocessing discussed in Japanese Patent No. 02620368 is applied to theimage.

SUMMARY OF THE INVENTION

Exemplary embodiments of the present invention are directed to an imageprocessing apparatus configured to perform image correction processingand capable of improving image quality.

According to an aspect of the present invention, an image processingapparatus is configured to apply correction processing to image datahaving sharpness varying depending on an alignment direction of pixels.The image processing apparatus includes a detection unit configured todetect a feature quantity in an edge direction of the image data; and asetting unit configured to set an intensity of the correction processingbased on correction intensity which is predetermined based on thesharpness varying depending on the alignment direction of the pixels,according to the feature quantity in the edge direction of the imagedata detected by the detection unit.

Further features of the present invention will become apparent from thefollowing detailed description of exemplary embodiments with referenceto the attached drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings, which are incorporated in and constitute apart of the specification, illustrate exemplary embodiments, featuresand aspects of the invention and, together with the description, serveto explain at least some of the principles of the invention.

FIGS. 1A and 1B are perspective diagrams illustrating a multifunctionperipheral (MFP) according to an exemplary embodiment of the presentinvention.

FIG. 2 is a block diagram illustrating a configuration of the MFPaccording to an exemplary embodiment of the present invention.

FIG. 3 is a flowchart illustrating image processing performed in the MFPaccording to an exemplary embodiment of the present invention.

FIGS. 4A to 4C illustrate exemplary processing regions set when the MPFperforms correction processing.

FIG. 5 is a flowchart illustrating exemplary processing for shifting thecorrection processing region.

FIGS. 6A and 6B illustrate an exemplary contact image sensor (CIS).

FIGS. 7A and 7B illustrate exemplary reading resolutions in horizontaland sub-scanning directions.

FIG. 8 is a flowchart illustrating correction intensity settingprocessing according to a first exemplary embodiment of the presentinvention.

FIGS. 9A1-9D1 and 9A2-9D2 are graphs illustrating exemplary featurequantities.

FIG. 10 illustrates exemplary extraction of four directions.

FIG. 11 illustrates exemplary L differences.

FIGS. 12A to 12C illustrate exemplary replacement of image data.

FIGS. 13A to 13C illustrate exemplary thresholds for replacementprocessing according to the first exemplary embodiment.

FIGS. 14A and 14B illustrate exemplary filtering processing according toa second exemplary embodiment.

FIGS. 15A and 15B illustrate exemplary achromatic coloring processingaccording to a third exemplary embodiment.

DETAILED DESCRIPTION OF THE EMBODIMENTS

The following description of exemplary embodiments is illustrative innature and is in no way intended to limit the invention, itsapplication, or uses.

Processes, techniques, apparatus, and systems as known by one ofordinary skill in the art are intended to be part of the enablingdescription where appropriate.

For example, certain circuitry for image processing, data processing,and other uses may not be discussed in detail. However, these systemsand the methods to fabricate these systems as known by one of ordinaryskill in the relevant art are intended to be part of the enablingdisclosure herein where appropriate.

It is noted that throughout the specification, similar referencenumerals and letters refer to similar items in the following figures,and thus once an item is described in one figure, it may not bediscussed for following figures.

Exemplary embodiments will be described in detail below with referenceto the drawings.

First Exemplary Embodiment

FIGS. 1A and 1B are perspective diagrams illustrating a multifunctionperipheral (MFP) 1 according to an exemplary embodiment of the presentinvention. FIG. 1A illustrates the MFP 1 with an auto document feeder(ADF) 31 which is in a closed state. FIG. 1B illustrates the MFP 1 withthe ADF 31 which is in an opened state.

The MFP 1 can communicate with a host computer (PC) and receive data toprint or scan the received data. The MFP 1, when operatingindependently, can function as a copying machine for printing an imageread by a scanner, and function as a printer for printing image dataread from a memory card or other storage medium and printing image datareceived from a digital camera.

As illustrated in FIGS. 1A and 1B, the MFP 1 includes a scan unit 14such as a flat bed scanner, a print unit 13 of an inkjet type or anelectrophotographic type, and an operation unit 15 equipped with adisplay unit 19 (e.g., a display panel) and various key switches.Furthermore, the MFP 1 includes a USB port (not illustrated) provided onits back surface to communicate with the PC, a card interface 22including card slots capable of reading data from various memory cards,and a camera interface 23 including a camera port for performing datacommunications with a digital camera. The MFP 1 includes the ADF 31 thatcan automatically set a document on a platen glass.

FIG. 2 is a block diagram illustrating an exemplary configuration of theMFP 1.

In FIG. 2, CPU 11 controls various functions of the MFP 1 and executesan image processing program stored in ROM 16 according to apredetermined instruction input via the operation unit 15. Throughexecution of the program, the CPU 11 can select object pixels to beprocessed and extract a predetermined size of image region including theprocessing target pixels.

Furthermore, the CPU 11 can calculate a feature quantity including avariation amount relating to the image region based on signal values ofpixels included in the image region.

The ROM 16 stores various tables and formulas used in the imageprocessing and can function as a setting unit configured to set arelationship between the feature quantity and correction intensity.

The scan unit 14, including a charge coupled device (CCD), is capable ofreading a document image and outputting analog luminance data of red(R), green (G), and blue (B) colors. As described below, the scan unit14 can output an image having a main-scanning resolution different froma sub-scanning resolution (as image data of a read document which are ADconverted and to be subjected to shading correction). For example, theoutput image may have a main-scanning resolution of 300 dpi and asub-scanning resolution of 600 dpi. The scan unit 14 may include acontact image sensor (CIS) instead of using the CCD. The ADF 31 cancontinuously read a plurality of documents and order sheets.

The card interface 22 can read image data from a memory card or otherstorage medium that stores image data captured by a digital still camera(DSC) in response to an instruction input by a user via the operationunit 15. An image processing unit 12 can convert a color space of theimage data read via the card interface 22, for example, from a DSC colorspace (e.g., YCbCr) to a standard RGB color space (e.g., NTSC-RGB orsRGB).

Furthermore, based on header information, the image processing unit 12can apply various processing to the read image data, such as conversionof resolution corresponding to the number of effective pixels, if theapplication requires. The camera interface 23 can be directly connectedto the DSC to read image data.

The image processing unit 12 performs image processing, such asconversion of reading signal value, correction and modulation processingof image, conversion from RGB luminance signals to CMYK concentrationsignals, scaling, gamma conversion, and error diffusion. The correctionprocessing performed by the image processing unit 12 includesreplacement processing, achromatic coloring processing, and filterprocessing. The image processing unit 12 functions as a correction unit.RAM 17 stores the image data obtained by the image processing unit 12.If the correction data stored in the RAM 17 reaches a predeterminedamount, the print unit 13 starts recording the correction data.

A nonvolatile RAM 18 can be a Static Random Access Memory (SRAM) whichis backed up by a battery. The RAM 18 stores data unique to the MFP 1.

The operation unit 15 includes a photo direct print start key thatenables a user to select image data stored in a memory card or otherstorage medium and start recording of the selected data. Furthermore,the operation unit 15 includes an order sheet print key, an order sheetreading key, a copy start key usable in a monochrome copy mode or acolor copy mode, a mode key that enables a user to designate copyresolution, image quality, or other mode settings, a stop key forstopping a copy operation, ten keys enabling a user to input the numberof copies, and a registration key. The CPU 11 controls respective unitsbased on the operated states of these keys.

The display unit 19 includes a dot matrix liquid crystal display unit(LCD) and an LCD driver. The CPU 11 controls the display unit 19 toperform various displays. For example, the display unit 19 can realize athumbnail display of image data recorded in a memory card or otherstorage medium. The print unit 13 can include an inkjet head and ageneral IC. The CPU 11 reads recorded data stored in the RAM 17,controls the print unit 13 to print the data and outputs a hard copy ofthe data.

A drive unit 21 drives the scan unit 14 and the print unit 13. To thisend, the drive unit 21 includes a stepping motor configured to shift amirror or a contact sensor of the scan unit 14 relative to a documentplaced on the platen glass, in addition to a stepping or DC motor fordriving sheet feed/discharge rollers, a gear mechanism for transmittinga driving force of the motor, and a driver circuit for controlling themotor.

A sensor unit 20 includes a recording sheet width sensor, a recordingsheet presence sensor, a document width sensor, a document presencesensor, and a recording medium detection sensor. The CPU 11 obtainsinformation indicating the state of a document or a recording sheetbased on signals supplied from the sensor unit 20.

A PC interface 24 is an interface that can control communicationsbetween the MFP 1 and a PC. More specifically, the MFP 1 can print datatransmitted from the PC via the PC interface 24 and can scan a documentaccording to an instruction transmitted from the PC. In a copy mode, theMFP 1 applies predetermined data processing to the image data read bythe scan unit 14 and causes the print unit 13 to print the processedimage data.

When a user instructs a copy operation via the operation unit 15, thescan unit 14 starts reading a document placed on a platen glass. Thescan unit 14 transmits the read data to the image processing unit 12.The image processing unit 12 applies various image processing operationsto the received data and transmits the processed image data to the printunit 13. The print unit 13 performs printing of the image data.

FIG. 3 is a flowchart illustrating exemplary image processing performedby the MPF 1 that operates in the copy mode.

In step S301, to correct differences caused by the image sensor, the CPU11 applies shading correction processing to image data read by the scanunit 14 and AD converted.

In step S302, the CPU 11 performs input device color conversionprocessing to convert unique signal data of an input device into data ofa standard color space region. The standard color space region is, forexample, sRGB defined by the International Electrotechnical Commission(IEC) or can be AdobeRGB proposed by Adobe Systems Incorporated. As anexemplary conversion method, the CPU 11 can use a calculation systembased on 3×3 or 3×9 matrix or a lookup table system using a table ofconversion rules.

In step S303, the CPU 11 applies correction (modulation) processing tothe converted data. More specifically, the CPU 11 performs edgeintensifying processing for correcting defocused states caused in areading operation, character modulation processing for improvingreadability of characters, and processing for removing show-througheffects which may be caused in a reading operation using lightirradiation.

In step S304, the CPU 11 performs enlargement/reduction processing. Whena user designates changing of a zooming rate, or when a user designatesallocating of two documents on a piece of paper, the CPU 11 sets asuitable magnification. The conversion method is, for example, a bicubicmethod, a bilinear method, or a nearest neighbor method.

As described later, if an image of a read document has a main-scanningresolution different from a sub-scanning resolution, in step S304, theCPU 11 performs processing for matching the resolution in themain-scanning direction with the resolution in the sub-scanningdirection.

For example, if the image corrected in step S303 has a main-scanningresolution of 300 dpi and a sub-scanning resolution of 600 dpi, the CPU11 can perform conversion for obtaining the same resolution of 300 dpiin both the horizontal and sub-scanning directions if such resolutionsare finally required.

In step S305, the CPU 11 converts the data of the standard color spaceinto signal data unique to an output device. When a printer of the MFP 1is an inkjet type, the CPU 11 executes processing for generating colordata of cyan, magenta, yellow, and black inks. The conversion method instep S302 can be similarly used in step S305.

In step S306, the CPU 11 performs quantization processing for convertingthe color data into data having the number of levels that the printercan record. For example, when the printer can perform recording of inkdots based on 2-valued information (e.g., on/off), the CPU 11 can use aquantization method such as error diffusion to obtain binary data. Thecolor data obtained through the quantization processing has a dataformat suitable for the printer that performs a recording operationbased on the converted color data and forms an image.

FIG. 4A illustrates an exemplary processing region (i.e., a regionalunit to be processed) when the MPF 1 performs correction processing. TheCPU 11 sets a 7×7 region including 7×7 pixels with a central targetpixel (indicated by mark ∘ as processing target). A bold line in FIG. 4Aindicates the 7×7 region set by the CPU 11.

The CPU 11 applies image processing to the target pixel based on imagesignals in the 7×7 region. Then, the CPU 11 sets, for example, the nexttarget pixel adjoining the present target pixel, as indicated by mark xin FIG. 4B. The CPU 11 sets a 7×7 region and executes image processingsimilarly. In this manner, the CPU 11 successively changes the targetpixel and sets a 7×7 region to correct all target pixels.

Alternatively, the CPU 11 can shift the correction processing region bya distance equivalent to a width of the region. For example, the CPU 11can set a 7×7 region including a central target pixel indicated by mark∘ in FIG. 4A, and apply the same correction intensity to the targetpixel and other pixels in the 7×7 region. Next, the CPU 11 can set a 7×7region including a central target pixel indicated by mark Δ in FIG. 4C.In other words, the CPU 11 shifts the correction processing region by adistance equivalent to the width of the region so that the 7×7 regionincluding the central pixel ∘ adjoins the 7×7 region including thecentral pixel Δ.

In the present exemplary embodiment, in order to more accurately set thecorrection intensity, the CPU 11 shifts the correction processing regionby a distance equivalent to the width of one pixel.

FIG. 5 is a flowchart illustrating exemplary processing for shifting thecorrection processing region. In step S501, the CPU 11 sets a processingobject. The CPU 11 sets an initial processing object upon starting theprocessing of this routine. When the processing flow returns from stepS505 to step S501, the CPU 11 sets the next processing object.

In step S502, the CPU 11 sets a processing region. As described above,the processing region is a region including a plurality of pixels (e.g.,7×7 region) with a central target pixel.

In step S503, the CPU 11 allocates correction intensity to theprocessing region set in step S502.

In step S504, the CPU 11 executes correction processing. Morespecifically, the CPU 11 applies correction to the processing regionbased on the correction intensity set in step S503.

In step S505, the CPU 11 determines whether the correction object is afinal processing region. If the CPU 11 determines that the correctionobject is not the final processing region (NO in step S505), theprocessing flow returns to step S501. If the correction object is thefinal processing region (YES in step S505), the CPU 11 terminates theprocessing of this routine.

The following is the definition of technical terms used in the presentexemplary embodiment.

The “variation amount” is a value representing the magnitude ofvariation in a pixel signal value in the pixel group including aprocessing object pixel positioned at the center thereof. In the presentexemplary embodiment, the variation amount is defined as a maximumabsolute value in the difference of luminance value between two pixelsadjoining one pixel at both sides thereof (refer to “edge amount”).

The variation amount is not limited to a specific value and thereforecan be defined based on any other information. For example, thevariation amount can be a value representing the absolute value of a1st-order differential of a value relating to an image signal of atarget pixel, or any other value expressing the difference (magnitude)of change, such as a value representing the difference (magnitude) ofchange in a value relating to image signals in a target region.

The “number of times of variation” is a value representing the frequencyof variation in the pixel signal value, occurring in a pixel groupincluding a processing object pixel positioned at the center thereof. Inthe present exemplary embodiment, the number of times of variation isdefined as a value representing the frequency of increase/decrease in3-valued data (sign change number (number of zero-crossing points))which are 3-valued data (e.g., −, 0, +) representing the difference inluminance value between two pixels adjoining one pixel at both sidesthereof in the image region.

However, the number of times of variation is not limited to a specificvalue and therefore can be defined based on any other information. Forexample, the number of times of variation can be defined as a valueexpressing the frequency of change in a value relating to an imagesignal such as the number of zero-crossing points (or space frequency)in a 1st-order differential of a value relating to an image signal of animage region, or the number of changes in black and white binarizeddata.

The “variation acceleration” is a value representing an acceleration ofvariation in the pixel signal value, in a pixel group including aprocessing object pixel positioned at the center thereof.

In the following exemplary embodiment, the variation acceleration isdefined as a value representing the luminance difference in the imageregion. However, the variation acceleration is not limited to a specificvalue and therefore can be defined based on any other information. Forexample, the variation acceleration is a value expressing a 2nd-orderdifferential of a value relating to an image signal in a target regionor any other value expressing the acceleration of change.

The “color saturation” is defined as a maximum absolute value in thedifference of image signals of each color in a target pixel (or region).However, the color saturation is not limited to a specific value andtherefore can be defined based on any other information. The colorsaturation can be defined as a value expressing the distance from theluminance axis.

Furthermore, the processing for “adaptively setting the correctionintensity” is defined as processing for setting correction intensitydifferentiated for each value in at least part of a value region takenby the defined “number of times of variation”, “variation amount”,“variation acceleration”, and “color saturation.”

In the first exemplary embodiment, the scan unit 14 is a contact imagesensor (CIS) whose reading resolution is 300 dpi in the main-scanningdirection and 600 dpi in the sub-scanning direction. The correctionprocessing performed by the CPU 11 is replacement processing.

FIGS. 6A and 6B illustrate exemplary 1-pass reading processing performedby a CIS including three light sources which can be successively turnedon. The scan unit 14 of the CIS, as illustrated in FIG. 6A, includesthree (RGB) light emitting diodes and a single image sensor. Asillustrated in FIG. 6B, the CIS performs reading processing bysuccessively turning on the RGB light emitting diodes.

In FIGS. 6A and 6B, an LED of a black character with white background isin a turned-on state and an LED of a white character with blackbackground is in a turned-off state.

The CIS shifts in the sub-scanning direction. More specifically, readingpositions of the RGB light emitting diodes relative to a document placedon a platen glass are mutually different. Therefore, color shifts mayoccur in the sub-scanning direction when the CIS reads an edge of adocument.

FIGS. 7A to 7C illustrate an exemplary operation of the CIS that canperform reading processing with the resolution of 300 dpi in themain-scanning direction and 600 dpi in the sub-scanning direction.

As illustrated in FIG. 7A, the CIS according to the present exemplaryembodiment includes image sensors disposed along a line at intervalsequivalent to 1200 dpi in the main-scanning direction. As illustrated inFIG. 7B, the CIS shifts a distance equivalent to 600 dpi in thesub-scanning direction so that the sensors can store electric chargewhile the LEDs are turned on.

On the other hand, the CIS adds the electric charge of four consecutivepixels aligned in the main-scanning direction and regards the summed-upelectric charge as electric charge of one pixel, as indicated by a boldline in FIG. 7C.

Thus, the CIS can perform reading processing with the resolution of 300dpi in the main-scanning direction and 600 dpi in the sub-scanningdirection.

Compared to the above-described reading mode (i.e., 300×600 mode), areading mode having a main-scanning resolution of 600 dpi and asub-scanning resolution of 600 dpi (i.e., 600×600 mode) can obtain anexcellent image quality.

However, if a high-speed reading mode (e.g., a high-speed copy operationmode) higher than the 600×600 mode is required, the S/N ratio maydeteriorate due to insufficient storage time.

Hence, as illustrated in FIG. 7C, summing up the electric charge of aplurality of pixels aligned in the main-scanning direction can improvethe S/N ratio. As a result, the main-scanning resolution can bedifferentiated from the sub-scanning resolution.

The relationship “main-scanning resolution<sub-scanning resolution” isan example in the exemplary embodiment. Any other conditions can be usedto differentiate the main-scanning resolution from the sub-scanningresolution.

In the first exemplary embodiment, the MFP 1 performs replacementprocessing as exemplary correction processing.

FIG. 8 is a flowchart illustrating correction intensity settingprocessing according to the first exemplary embodiment.

Step S801 is a step of setting a processing region. More specifically,in the image data including RGB multi-value image signals, the CPU 11sets a 7×7 processing region including seven pixels in the lateraldirection and seven pixels in the vertical direction with a target pixelpositioned at the center thereof. The CPU 11 calculates a luminance Lbased on respective pixel values in the processing region according tothe formula (1) and generates a 7×7 processing region having theluminance L.L=(R+2×G+B)/4  (1)

The present exemplary embodiment calculates the luminance L according tothe formula (1). However, the present exemplary embodiment can use anyanother luminance value, such as luminance L* in a uniform color spaceL*a*b* or luminance Y of YCbCr.

FIG. 9A1 illustrates the luminance L measured in a main-scanningoperation of the CIS that reads black vertical lines (4 lines/mm) incontrast with white background. FIG. 9A2 illustrates the luminance Lmeasured in a sub-scanning operation of the CIS that reads black laterallines (4 lines/mm) in contrast with white background.

Step S802 is a step of extracting four directions. More specifically,the CPU 11 extracts a group of seven consecutive pixels aligned in thelateral direction, a group of seven consecutive pixels aligned in thevertical direction, a group of seven consecutive pixels aligned in aleft ascending direction, and a group of seven consecutive pixelsaligned in a right ascending direction, from the processing region ofthe luminance L generated in step S801, as illustrated in FIG. 10.

Step S803 is a step of calculating L difference. As illustrated in FIG.11 and apparent from the following formula (2), the CPU 11 calculatesdifference Grd of the luminance L for five pairs of pixels in eachdirection, based on the luminance L of four directions extracted in stepS802.Grd(i)=L(i+1)−L(i−1)  (2)

In the formula (2), pixel L(i−1) precedes pixel L(i) and pixel L(i+1)succeeds the pixel L(i). The method for calculating the L difference isnot limited to a specific method. For example, the CPU 11 can calculatethe L difference between two neighboring pixels or any two pixelsfurther spaced away.

FIG. 9B1 illustrates the difference Grd obtained by applying the formula(2) to the luminance L of FIG. 9A1. FIG. 9B2 illustrates the differenceGrd obtained by applying the formula (2) to the luminance L of FIG. 9A2.

Step S804 is a step of determining an edge direction. More specifically,the CPU 11 obtains an absolute value of Grd in each of the fourdirections of the target pixel calculated in step S803. The CPU 11determines a direction of a maximum absolute value of Grd as an edgedirection of the target pixel.

Step S805 is a step of calculating a variation amount. Morespecifically, the CPU 11 calculates the differences Grd in step S803about five pixels of the seven consecutive pixels aligned in the edgedirection determined in step S804. The CPU 11 compares the calculateddifferences Grd of the five pixels, and identifies a maximum absolutevalue as a variation amount of the target pixel (edge amount).

As illustrated in FIGS. 9B1 and 9B2, a variation amount in themain-scanning direction is smaller than a variation amount in thesub-scanning direction because of higher smoothing effects derived fromthe main-scanning resolution which is lower than the sub-scanning.

Namely, sharpness of an image in the main-scanning direction isdifferent from that in the sub-scanning direction. In other words, thedegree of the defocused state in the main-scanning direction isdifferent from that in the sub-scanning direction. Furthermore, the lenscharacteristics of a scanner are variable depending on the direction.

Therefore, if a scanner has the MTF differentiated between themain-scanning direction and the sub-scanning direction, the sharpness ofan image is variable depending on the direction even if themain-scanning resolution is not different from the sub-scanningresolution. The technique according to the present exemplary embodimentcan be applied to any image data whose sharpness is variable dependingon the direction.

Step S806 is a step of calculating the number of times of variation. TheCPU 11 sums up the number of times of variation occurring in thedifference Grd of four directions calculated in step S803.

In the present exemplary embodiment, the CPU 11 counts the number ofchanges in the sign of the difference Grd which changes from + to − orvice versa, or may change from + to 0 and next to + or change from − to0 and next to + (i.e., the number of zero-crossing points), as thenumber of times of variation of the target pixel.

Step S807 is a step of determining maximum and minimum luminancepositions. More specifically, the CPU 11 determines the positions ofpixels having the maximum luminance L and the minimum luminance L fromthe seven consecutive pixels of the luminance L aligned in the edgedirection, selected from four directions extracted in step S802, aboutthe edge direction determined in step S804.

Step S808 is a step of calculating the variation acceleration. The CPU11 calculates variation acceleration Lap of three pixels based on thedifferences Grd of the edge direction calculated in step S803, about theedge direction determined in step S804.

More specifically, the CPU 11 can calculate the variation accelerationbased on the following formula (3) in which pixel Grd(i−1) precedespixel Grd(i) and pixel Grd(i+1) succeeds the pixel Grd(i).

FIG. 9C1 and FIG. 9C2 illustrate the variation acceleration Lap obtainedby applying the formula (3) to the difference Grd of FIG. 9B1 and FIG.9B2, respectively.Lap(i)=Grd(i+1)−Grd(i−1)  (3)The method for calculating the variation acceleration is not limited tothe above-described method. For example, the CPU 11 can calculate thevariation acceleration based on differences between neighboring pixelsGrd.

Step S809 is a step of determining the position of a pixel to bereplaced. The CPU 11 determines the position of a pixel to be replacedbased on the positions of pixels having the maximum luminance L and theminimum luminance L determined in step S807 and the variationacceleration Lap calculated in step S808.

As illustrated in FIGS. 9C1 and 9C2, when the sign of Lap is plus, the Lvalue of the target pixel tends to be closer to the minimum L ratherthan the maximum L. When the sign of Lap is minus, the L value of thetarget pixel tends to be closer to the maximum L rather than the minimumL.

Hence, the CPU 11 determines the position of a pixel to be replacedbased on the sign of Lap with reference to the table 1. As a result ofreplacement, the CPU 11 can obtain L values illustrated in FIGS. 9D1 and9D2 changed from the L values illustrated in FIGS. 9A1 and 9A2.

Although the present exemplary embodiment determines the position of apixel to be replaced with reference to the table 1, an edge center wherethe Lap of the target pixel becomes 0 can be determined without usingthe table 1. For example, if the Lap of the target pixel is 0, theposition of a pixel to be replaced can be the position of a pixel havingthe maximum L or the minimum L.

TABLE 1 Sign of Lap + − 0 0 0 of target pixel Sum of Lap + − 0 signs ofback and forth pixels Position Minimum Maximum Minimum Maximum Maximumof pixel to L L L L L be replaced

Step S810 is a step of setting replacement intensity Ce based on thevariation amount. Completely replacing the target pixel values with thereplacement pixel values determined in step S809 can enhance thesharpness of an image as apparent from the comparison between thereplaced L values illustrated in FIGS. 9D1 and 9D2 and the original Lvalues illustrated in FIGS. 9A1 and 9A2.

However, a jaggy image region may stand out. According to the presentexemplary embodiment in which the main-scanning direction is a lowresolution direction, a jaggy image region tends to become larger and/orintensified when the resolution becomes higher. Hence, the presentexemplary embodiment describes exemplary replacement processing capableof intensifying the edge while limiting an intensity of a jaggy imageregion.

As illustrated in FIGS. 9B1 and 9B2, the variation amount in thesub-scanning direction (i.e., high resolution direction) is larger thanthe variation amount in the main-scanning direction (i.e., lowresolution direction).

Considering this relationship, the present exemplary embodiment sets thethresholds such that the replacement intensity Ce in the sub-scanningdirection becomes larger than that in the main-scanning direction, asdescribed below.

FIG. 13A is a graph illustrating exemplary setting of the replacementintensity Ce in step S810. In FIG. 13A, an abscissa represents thevariation amount, an ordinate represents the replacement intensity Ce,and first and second thresholds are predetermined thresholds obtainedfrom the measurement data of FIGS. 9A1-9D2.

More specifically, the first and second thresholds can be determinedbeforehand based on the luminance L measured by the CIS that performsmain-scanning of black vertical lines (4 lines/mm) in contrast withwhite background and the luminance L measured by the CIS that performssub-scanning of black lateral lines (4 lines/mm) in contrast with whitebackground.

The first threshold is set to be a value not greater than the absolutevalue of the maximum variation amount (i.e., absolute value of maximumGrd) in the sub-scanning direction of FIG. 9B2. The second threshold isset to be a value not less than the absolute value of the maximumvariation amount (i.e., absolute value of maximum Grd) in themain-scanning direction of FIG. 9B1.

The first threshold and the second threshold are set in a rangesatisfying the relationship “maximum variation amount in themain-scanning direction≦first threshold<second threshold≦maximumvariation amount in the sub-scanning direction.”

When the variation amount is less than the first threshold, the CPU 11sets the replacement intensity Ce to 0. When the variation amount isgreater than the second threshold, the CPU 11 sets the replacementintensity Ce to 1 for complete replacement.

When the variation amount is in a range from the first threshold to thesecond threshold, the CPU 11 adaptively sets the replacement intensityCe which linearly changes depending on the variation amount from 0 (whenthe variation amount is equal to the first threshold) to 1 (when thevariation amount is equal to the second threshold).

More specifically, the CPU 11 can adaptively set replacement intensityCe with reference to the relationship illustrated in FIG. 13A or basedon the following formula (4).Ce=(variation amount−first threshold)/(second threshold−firstthreshold)  (4)

With the above-described settings, the CPU 11 can set the replacementintensity of the sub-scanning direction which is greater than thereplacement intensity of the main-scanning direction. In other word, thepresent exemplary embodiment can limit the occurrence of a jaggy imageby reducing the replacement intensity of the main-scanning direction(i.e., the direction having a higher possibility of generating a jaggyimage).

In general, a moire image (e.g., an image having a moire appearance ormoire effect portion) tends to occur in the main-scanning direction(i.e., in the low resolution direction) The present exemplary embodimentcan limit generation of a moire image by setting the first thresholdwhich is not greater than the variation amount in the sub-scanningdirection and the second threshold which is not less than the variationamount in the main-scanning direction. The threshold setting accordingto the present exemplary embodiment is effective in limiting the moireintensification.

Compared to the technique discussed in Japanese Patent No. 03099354, thepresent exemplary embodiment has the following features. The techniquediscussed in Japanese Patent No 03099354 has the purpose and effects ofeliminating discontinuity (switching) in the edge intensifyingprocessing without intensifying the noise.

According to the technique discussed in Japanese Patent No. 03099354,the replacement intensity in the sub-scanning direction may becomesmaller than the replacement intensity in the main-scanning direction.

In the present exemplary embodiment, setting the first threshold to be avalue not greater than the variation amount in the sub-scanningdirection and setting the second threshold to be a value not less thanvariation amount in the main-scanning direction becomes feasible basedon the relationship that the variation amount in the sub-scanningdirection (i.e., high resolution direction) is smaller than thevariation amount in the main-scanning direction (low resolutiondirection).

The replacement processing can reduce color shifts in the followingmanner. FIG. 12A illustrates L values in a state where the replacementprocessing is not yet performed. FIG. 12B illustrates Lap values of theL values illustrated in FIG. 12A. FIG. 12C illustrates L valuesresulting from the replacement processing. The color shifts tend toappear on or near an edge, e.g., the position corresponding to theseventh pixel illustrated in FIG. 12A.

The present exemplary embodiment performs the replacement processing insuch a way as to replace the sixth pixel of FIG. 12A with the thirdpixel, the seventh pixel of FIG. 12A with the fourth pixel, and theeighth pixel of FIG. 12A with the eleventh pixel (refer to FIG. 12C).

In other words, the present exemplary embodiment can replace any pixelhaving a higher possibility of causing the color shift with the pixel ofa background or a black character (which does not generate the colorshift). Thus, the present exemplary embodiment can reduce color shifts.The replacement processing is effective in enhancing the sharpness andreducing the color shifts, and is therefore applicable to the CISaccording to the present exemplary embodiment.

Setting of the above-described thresholds can be determined beforehandbased on experimentally obtained data. Alternatively, the thresholds canbe set appropriately based on data obtained from a pre-scanned orscanned image.

Step S811 is a step of setting replacement intensity Cl based on theabsolute value of the variation acceleration. The CPU 11 sets thereplacement intensity Cl adaptively depending on the absolute value ofthe variation acceleration calculated in step S808.

As illustrated in FIGS. 9C1 and 9C2, the absolute value of variationacceleration in the sub-scanning direction (i.e., high resolutiondirection) is greater than that in the main-scanning direction (i.e.,low resolution direction). Hence, the present exemplary embodiment setsthe thresholds in such a way as to have the replacement intensity Cl inthe sub-scanning direction which is greater than that in themain-scanning direction, as described below.

FIG. 13B is a graph illustrating exemplary setting of the replacementintensity Cl in step S811. In FIG. 13B, an abscissa represents theabsolute value of the variation acceleration, an ordinate represents thereplacement intensity Cl, and third and fourth thresholds arepredetermined thresholds obtained from the measurement data of FIGS.9A1-9D2.

More specifically, the third and fourth thresholds can be determinedbeforehand based on the luminance L measured by the CIS that performsmain-scanning of black vertical lines (4 lines/mm) in contrast withwhite background and the luminance L measured by the CIS that performssub-scanning of black lateral lines (4 lines/mm) in contrast with whitebackground.

The third threshold is set to be a value not greater than the absolutevalue of the maximum variation acceleration (i.e., absolute value ofmaximum Lap) in the sub-scanning direction of FIG. 9C2. The fourththreshold is set to be a value not less than the absolute value of themaximum variation acceleration (i.e., absolute value of maximum Lap) inthe main-scanning direction of FIG. 9C1.

The third threshold and the fourth threshold are set in a rangesatisfying the relationship “maximum absolute value of the variationacceleration in the main-scanning direction≦third threshold<fourththreshold≦maximum absolute value of the variation acceleration in thesub-scanning direction.”

When the absolute value of the variation acceleration is less than thethird threshold, the CPU 11 sets the replacement intensity Cl to 0. Whenthe absolute value of the variation acceleration is greater than thefourth threshold, the CPU 11 sets the replacement intensity Cl to 1 forcomplete replacement.

When the absolute value of the variation acceleration is in a range fromthe third threshold to the fourth threshold, the CPU 11 adaptively setsthe replacement intensity Cl which linearly changes depending on theabsolute value of the variation acceleration from 0 (when the absolutevalue of the variation acceleration is equal to the third threshold) to1 (when the absolute value of the variation acceleration is equal to thefourth threshold).

More specifically, the CPU 11 can set the replacement intensity Cladaptively with reference to the graph illustrated in FIG. 13B or basedon the following formula (5).Cl=(absolute value of the variation acceleration−thirdthreshold)/(fourth threshold−third threshold)  (5)

Through the above-described settings, the CPU 11 can set the replacementintensity in the sub-scanning direction which is not smaller than thereplacement intensity in the main-scanning direction.

The present exemplary embodiment can limit the replacement intensity inthe main-scanning direction (i.e., the direction having a higherpossibility of generating a jaggy image) and therefore can reduce theoccurrence of a jaggy image. Furthermore, the present exemplaryembodiment can reduce the occurrence of a moire image in themain-scanning direction which may arise due to replacement processingand can enhance the sharpness in the sub-scanning direction.

Step S812 is a step of setting replacement intensity Cz based on thenumber of times of variation. More specifically, the CPU 11 sets thereplacement intensity Cz adaptively depending on the number of times ofvariation calculated in step S806.

The CPU 11 sets the replacement intensity Cz with reference to thecharacteristics defined by fifth and sixth thresholds as illustrated inFIG. 13C. If the number of times of variation is less than the fifththreshold (e.g., bold line), the CPU 11 sets Cz to 1 (Cz=1). If thenumber of times of variation is greater than the sixth threshold (e.g.,a thin line or a halftone dot), the CPU 11 sets Cz to 0 (Cz=0).

If the number of times of variation is in a range from the fifththreshold to the sixth threshold, the CPU 11 can set Cz adaptively basedon the following formula (6).Cz=(sixth threshold−number of times of variation)/(sixth threshold−fifththreshold)  (6)

Through the above-described settings, the present exemplary embodimentcan limit intensification applied to a thin line having a higherpossibility of generating a jaggy image and a halftone dot image havinga higher possibility of generating a moire image, and further canintensify a bold line.

Step S813 is a step of calculating an amount of replacement. The CPU 11calculates an amount of replacement based on a pixel value of theposition of a pixel to be replaced determined in step S809. The CPU 11extracts RGB values of the position of a pixel to be replaced which isdetermined in step S809, from the 7×7 region of RGB set in step S801.The CPU 11 can calculate ΔC based on the following formula (7) when N0represents a target pixel value, C0 represents a pixel value of theposition of a pixel to be replaced, and ΔC represents an amount ofreplacement.ΔC=C0−N0  (7)

Step S814 is a step of correcting the replacement amount. The CPU 11corrects the replacement amount ΔC calculated in step S813 with thereplacement intensities Ce, Cl, and Cz set in steps S810 to S812. TheCPU 11 calculates a corrected replacement amount ΔC′ based on thefollowing formula (8).ΔC′=Ce×Cl×Cz×ΔC  (8)

Step S815 is a step of completing the replacement processing. The CPU 11calculates, as an edge intensified output resulting from the replacementprocessing, a target pixel value Nc by adding the replacement amount ΔC′calculated in step S814 to the target pixel value N0 as illustrated inthe following formula (9).Nc=N0+ΔC′  (9)

Through the above-described replacement processing, the presentexemplary embodiment can perform replacement processing using theintensity in the main-scanning direction which is weak compared to thatin the sub-scanning direction. Thus, the present exemplary embodimentcan limit the replacement intensity in the main-scanning direction(i.e., in the direction having a higher possibility of generating ajaggy image), and accordingly can reduce the occurrence of a jaggyimage. Furthermore, the present exemplary embodiment can limit the moireintensification which may occur in the main-scanning direction (i.e.,low resolution direction) and can enhance the sharpness in thesub-scanning direction.

The present exemplary embodiment uses the feature quantity relating tothe luminance L. However, the feature quantity is not limited to theluminance L and can be a value relating to RGB pixel values.Furthermore, the present exemplary embodiment is not limited to theresolution varying depending on the direction. For example, thecorrection intensity such as replacement intensity can be changed basedon any feature quantity derived from MTF, defocused state, and sharpnessvarying depending on the direction.

Second Exemplary Embodiment

The first exemplary embodiment changes the replacement intensity basedon the feature quantity derived from the resolution varying depending onthe direction. However, the processing performed according to thepresent invention is not limited to the replacement processing. Thesecond exemplary embodiment is described below with reference to filterprocessing as other exemplary processing.

FIG. 14A illustrates a 5×5 filter including a central target pixelaccording to the second exemplary embodiment. The CPU 11 can calculate afiltering edge intensifying amount ΔF based on the formula (10) when N0represents a target pixel value and F0 represents a target pixel valuehaving been filtered.ΔF=F0−N0  (10)

FIG. 14B is a graph illustrating exemplary setting of filter intensityFe. The seventh threshold is set to be a value not greater than thevariation amount in the sub-scanning direction. The eighth threshold isset to be a value not less than the variation amount in themain-scanning direction. The seventh threshold and the eighth thresholdcan be different from the first threshold and the second threshold, orcan be set appropriately depending on the type of correction processing.

When the variation amount is less than the seventh threshold, the CPU 11sets the filter intensity Fe to 0. When the variation amount is greaterthan the eighth threshold, the CPU 11 sets the filter intensity Fe to 1for complete replacement. When the variation amount is in a range fromthe seventh threshold to the eighth threshold, the CPU 11 adaptivelysets the filter intensity Fe which linearly changes depending on thevariation amount from 0 (when the variation amount is equal to theseventh threshold) to 1 (when the variation amount is equal to theeighth threshold).

More specifically, the CPU 11 can adaptively set the filter intensity Fewith reference to the graph illustrated in FIG. 14B or based on thefollowing formula (11).Fe=(variation amount−seventh threshold)/(eighth threshold−sevenththreshold)  (11)

The CPU 11 can calculate a corrected filter intensifying amount ΔF′based on the following formula (12).ΔF′=Fe×ΔF  (12)The CPU 11 can use the following formula (13) to calculate a targetpixel value Nf having been edge intensified by a filter.Nf=N0+ΔF′  (13)

Through the above-described settings, the present exemplary embodimentcan set the filter intensity in the sub-scanning direction which is notless than the filter intensity in the main-scanning direction. There isthe tendency that a jaggy image occurs when the filter intensity islarge. The present exemplary embodiment can limit the filter intensityin the main-scanning direction (i.e., in the direction having a higherpossibility of generating a jaggy image) and accordingly can reduce theoccurrence of a jaggy image.

Furthermore, there is the tendency that generation of a moire imageincreases in the main-scanning direction (i.e., in the low resolutiondirection). The seventh threshold is set to be a value not greater thanthe variation amount in the sub-scanning direction. The eighth thresholdis set to be a value not less than the variation amount in themain-scanning direction. The above-described threshold settings caneffectively limit the moire intensification generated by a filter.

The filter size and coefficients are not limited to the above-describedexamples. Therefore, the present exemplary embodiment can use anothersize and coefficients. Furthermore, the change of the filter intensityis not limited to the above-described example. Therefore, filtercoefficients can be changed depending on the variation amount.

Third Exemplary Embodiment

The first and second exemplary embodiments change the replacementintensity and the filter intensity based on the feature quantity derivedfrom the resolution varying depending on the direction. In a case ofmodulations applied to characters, achromatic coloring processing can beperformed in addition to the above-described processing. The thirdexemplary embodiment is described below based on achromatic coloringprocessing.

The CPU 11 calculates an average value of each color in a 3×3 regionincluding a central target pixel illustrated in FIG. 15A. When AR, AG,and AB represent average values of RGB pixel values having been read,the CPU 11 obtains color saturation corresponding to a maximum valueamong |AR−AG|, |AG−AB|, and |AB−AR|.

The calculation of the color saturation is not limited to theabove-described example. The size of a target region is not limited tothe above-described 3×3 region and can be selected from other regionshaving different sizes. Furthermore, the color space is not limited tothe RGB space. The distance from the luminance axis can be obtained byusing chrominance components obtained by converting a block into aluminance chrominance space.

The CPU 11 determines whether the target pixel is an achromatic colorbased on the comparison between the color saturation and a thresholdbeing appropriately set. If the CPU 11 determines that the colorsaturation is not greater than the threshold and the target pixel is anachromatic color, the CPU 11 calculates an achromatic coloring amount ΔKbased on the following formula (14), wherein N0 represents a targetpixel value and Ng represents a green (G) value of the target pixel.ΔK=Ng−N0  (14)

FIG. 15B is a graph illustrating exemplary setting of achromaticcoloring intensity Ke. The ninth threshold is set to be a value notgreater than the variation amount in the sub-scanning direction. Thetenth threshold is set to be a value not less than the variation amountin the main-scanning direction.

The ninth threshold and tenth threshold can be different from the firstthreshold and the second threshold, or can be set appropriatelydepending on the type of correction processing. When the variationamount is less than the ninth threshold, the CPU 11 sets the achromaticcoloring intensity Ke to 0. When the variation amount is larger than thetenth threshold, the CPU 11 sets the achromatic coloring intensity Ke to1 for complete replacement.

When the variation amount is in a range from the ninth threshold to thetenth threshold, the CPU 11 adaptively sets the achromatic coloringintensity Ke which linearly changes depending on the variation amountfrom 0 (when the variation amount is equal to the ninth threshold) to 1(when the variation amount is equal to the tenth threshold).

More specifically, the CPU 11 can adaptively set the achromatic coloringintensity Ke with reference to the graph illustrated in FIG. 15B orbased on the following formula (15).Ke=(variation amount−ninth threshold)/(tenth threshold−ninththreshold)  (15)

The CPU 11 can calculate corrected achromatic coloring amount ΔK′ basedon the following formula (16).ΔK′=Ke×ΔK  (16)

The CPU 11 can calculate target pixel value Nk of an achromatic colorbased on the following formula (17).Nk=N0+ΔK′  (17)

Through the above-described settings, the present exemplary embodimentcan set the achromatic coloring intensity in the sub-scanning directionwhich is not less than the achromatic coloring intensity in themain-scanning direction.

When the achromatic coloring processing has strong intensity, or whenall of R, G, and B values are 0 or the same value, a printer may useonly pigment inks. The pigment inks cause less bleeding on a recordingmedium, compared to dye inks. An edge of a printed image tends to besharp. Therefore, there is a higher possibility of generating a jaggyimage.

The present exemplary embodiment can limit the achromatic coloringintensity in the main-scanning direction (i.e., the direction having ahigher possibility of generating a jaggy image) and therefore can reducethe occurrence of jaggy image regions.

In general, a moire image tends to be generated in the main-scanningdirection (i.e., in the low resolution direction). The ninth thresholdis set to be a value not greater than the variation amount in thesub-scanning direction. The tenth threshold is set to be a value notless than the variation amount in the main-scanning direction.

The above-described threshold settings can effectively limit moireintensification owing to increased density which may result fromincrease in a supply amount of black pigment for achromatic coloringprocessing.

Other Exemplary Embodiment

The above-described first, second, and third exemplary embodimentsoptimize the correction intensity by setting the thresholds depending onthe difference of feature quantities when the scan unit 14 has themain-scanning resolution which is different from the sub-scanningresolution. An exemplary embodiment according to the present inventioncan be effective not only for the reading resolution but for otherfeature.

According to Joint Photographic Experts Group (JPEG) which is widelyused as a compression file format, there are a plurality of combinationsfor the constituent elements of pixel data and sampling of pixels.

YCbCr4:2:2 (Y represents a luminance signal, and Cb and Cr representchrominance signals) is a format for performing down sampling (subsampling) in such a way that the sampling number of Y is two times thesampling number of Cb and Cr in the lateral direction. The down samplingincludes averaging chrominance signals of two neighboring pixels in thelateral direction. The purpose of down sampling is reducing the filesize, considering visual characteristics of human eyes which areinsensitive against the change of Cb and Cr compared to the change of Y.

When JPEG is decompressed, the pixel number of Cb and Cr becomes equalto the pixel number of Y. However, a defocused state tends to occur inthe lateral direction compared to the vertical direction, because Cb andCr are averaged for the down-sampling in the lateral direction.

This is similar to the phenomenon in the first to third exemplaryembodiments, in which the variation amount in the sub-scanning direction(i.e., high resolution direction) is larger compared to the variationamount in the main-scanning direction. According to JPEG of YCbCr4:2:2,chrominance components have a variation amount in the vertical directionwhich is greater than that in the lateral direction.

Accordingly, it is difficult to optimum the processing result if imageprocessing is performed by setting the same intensity in both thelateral and vertical directions without considering the difference infeature quantities. Hence, the processing result can be optimized bysetting thresholds considering the difference in feature quantities, soas to obtain the correction intensity varying depending on thedirection.

Furthermore, YCbCr4:2:0 is a format for performing down-sampling in sucha way that the sampling number of Y is two times the sampling number ofCb and Cr in both the lateral direction and the vertical direction.According to this format, the processing result can be optimized bydifferentiating the correction intensity for Y from the correctionintensity for Cb and Cr based on appropriate settings of thresholds.

As described above, the present exemplary embodiment is effective notonly for the characteristic feature derived from the difference inreading resolution but also for the characteristic feature derived fromthe difference in sampling number.

The exemplary embodiments of the present invention apply correctionprocessing to image data having the resolution varying depending on thealignment direction of pixels, with reference to the difference of thefeature quantity in the alignment direction of pixels.

The exemplary embodiments of the present invention sets thresholdsoptimized according to the difference in the feature quantity and thetype of image processing (correction processing). Thus, the exemplaryembodiments of the present invention can set optimum intensity for thecorrection processing depending on the alignment direction of pixels.

As a result, the exemplary embodiments of the present invention caneliminate image deteriorations which tend to occur in the conventionalimage processing due to the resolution varying in each alignmentdirection of pixels.

While the present invention has been described with reference toexemplary embodiments, it is to be understood that the invention is notlimited to the disclosed exemplary embodiments. The scope of thefollowing claims is to be accorded the broadest interpretation so as toencompass all modifications, equivalent structures, and functions.

This application claims priority from Japanese Patent Application No.2006-188047 filed Jul. 7, 2006, which is hereby incorporated byreference herein in its entirety.

1. An image processing apparatus, comprising: a correcting unit forcorrecting a signal value of image data corresponding to pixels alignedin a first alignment direction and in a second alignment direction thatis perpendicular to the first alignment direction, the correcting unitperforming a correction processing for intensifying an edge of imagedata; a detection unit for detecting a direction of the edge of theimage data with respect to a predetermined pixel of the image data basedon a luminance value of the predetermined pixel and a luminance value ofpixels surrounding the predetermined pixel; a calculating unit forcalculating a variation amount indicating a magnitude of change in theluminance value in the direction of the edge based on the luminancevalue of the predetermined pixel and the luminance value of the pixelssurrounding the predetermined pixel; and a setting unit for setting anintensity of the correction processing based on correction intensitywhich is predetermined based on sharpness varying depending on analignment direction of the pixels, according to the calculated variationamount in the edge direction of the image data detected by the detectionunit, wherein when sharpness of the image data in the first alignmentdirection is higher than sharpness of the image data in the secondalignment direction, the setting unit sets the correction intensity suchthat the correction intensity for the image data having the variationamount in the first alignment direction is set to be stronger than thecorrection intensity for the image data having the variation amount inthe second alignment direction, wherein thresholds of the variationamount define the predetermined correction intensity, such thatcorrection intensity for the image data having the variation amount inthe first alignment direction having higher sharpness is set to bestronger than correction intensity for the image data having thevariation amount in the second alignment direction having lowersharpness, and wherein the thresholds are values in a range between amaximum variation amount of the first alignment direction of pixels anda maximum variation amount of the second alignment direction of pixels,with respect to the predetermined pixel of the image data.
 2. The imageprocessing apparatus according to claim 1, wherein the thresholdsinclude a first threshold not greater than a maximum variation amount inthe first alignment direction and a second threshold not less than amaximum variation amount in the second alignment direction, with respectto the predetermined pixel of the image data.
 3. The image processingapparatus according to claim 1, wherein the image data have sharpness ina main-scanning direction which is different from sharpness in asub-scanning direction, due to a difference in Modulation TransferFunction (MTF) of a reading apparatus between a main-scanning directionand a sub-scanning direction.
 4. The image processing apparatusaccording to claim 1, wherein the alignment direction of pixels includesa main-scanning direction and a sub-scanning direction in an opticalreading operation of a document, wherein the sharpness varies dependingon a difference between reading resolution in the main-scanningdirection and reading resolution in the sub-scanning direction, in theoptical reading operation.
 5. The image processing apparatus accordingto claim 4, wherein the reading resolution in the sub-scanning directionis higher than the reading resolution in the main-scanning direction. 6.The image processing apparatus according to claim 1, wherein thealignment direction of pixels includes a lateral direction and avertical direction of image data, wherein the sharpness varies dependingon a difference in sampling of pixels.
 7. The image processing apparatusaccording to claim 6, wherein the sampling of pixels in the verticaldirection is performed frequently compared to the sampling of pixels inthe lateral direction.
 8. The image processing apparatus according toclaim 1, wherein the variation amount is a variation amount of aprocessing target pixel, calculated based on at least one pixel value ofpixels positioned in a vicinity of the processing target pixel.
 9. Theimage processing apparatus according to claim 8, wherein the variationamount is a variation amount of the processing target pixel having amaximum absolute value among variation amounts of a plurality ofdirections.
 10. The image processing apparatus according to claim 1,wherein the correction processing is at least one of replacementprocessing, filter processing, and achromatic coloring processing. 11.The image processing apparatus according to claim 1, wherein thecorrection intensity is replacement intensity.
 12. The image processingapparatus according to claim 1, wherein the correction intensity isfilter intensity.
 13. The image processing apparatus according to claim1, wherein the correction intensity is achromatic coloring intensity.14. A method for applying correction processing to image data having afirst reading resolution in a first alignment direction and a secondreading resolution in a second alignment direction, the methodcomprising: correcting a signal value of image data corresponding topixels aligned in the first alignment direction and in the secondalignment direction that is perpendicular to the first alignmentdirection, and performing a correction processing for intensifying anedge of image data; detecting a direction of the edge of the image datawith respect to a predetermined pixel of the image data based on aluminance value of the predetermined pixel and a luminance value ofpixels surrounding the predetermined pixel; calculating a variationamount indicating a magnitude of change in the luminance value in thedirection of the edge based on the luminance value of the predeterminedpixel and the luminance value of the pixels surrounding thepredetermined pixel; and setting an intensity of the correctionprocessing based on correction intensity which is predetermined based onsharpness varying depending on an alignment direction of the pixels,according to the calculated variation amount in the edge direction ofthe detected image data, wherein when sharpness of the image data in thefirst alignment direction is higher than sharpness of the image data inthe second alignment direction, setting includes setting the correctionintensity such that the correction intensity for the image data havingthe variation amount in the first alignment direction is set to bestronger than the correction intensity for the image data having thevariation amount in the second alignment direction, wherein thresholdsof the variation amount define the predetermined correction intensity,such that correction intensity for the image data having the variationamount in the first alignment direction having higher sharpness is setto be stronger than correction intensity for the image data having thevariation amount in the second alignment direction having lowersharpness, and wherein the thresholds are values in a range between amaximum variation amount of the first alignment direction of pixels anda maximum variation amount of the second alignment direction of pixels,with respect to the predetermined pixel of the image data.
 15. Themethod according to claim 14, wherein the first alignment directioncomprises a main-scanning direction and the second alignment directioncomprises a sub-scanning direction, and wherein the second readingresolution in the sub-scanning resolution is higher than the firstreading resolution in the main-scanning direction.
 16. The methodaccording to claim 14, wherein the variation amount is a variationamount of a processing target pixel, calculated based on at least onepixel value of pixels positioned in a vicinity of the processing targetpixel.
 17. The method according to claim 14, wherein the correctionprocessing is at least one of replacement processing, filter processing,and achromatic coloring processing.
 18. A non-transitorycomputer-readable medium storing instructions for causing an apparatusto apply correction processing to image data having sharpness varyingdepending on an alignment direction of pixels, when the instructions areexecuted by the apparatus, the instructions cause the apparatus toperform operations comprising: correcting a signal value of image datacorresponding to pixels aligned in a first alignment direction and in asecond alignment direction that is perpendicular to the first alignmentdirection, and performing a correction processing for intensifying anedge of image data; detecting a direction of the edge of the image datawith respect to a predetermined pixel of the image data based on aluminance value of the predetermined pixel and a luminance value ofpixels surrounding the predetermined pixel; calculating a variationamount indicating a magnitude of change in the luminance value in thedirection of the edge based on the luminance value of the predeterminedpixel and the luminance value of the pixels surrounding thepredetermined pixel; and setting an intensity of the correctionprocessing based on correction intensity which is predetermined based onsharpness varying depending on an alignment direction of the pixels,according to the calculated variation amount in the edge direction ofthe detected image data, wherein when sharpness of the image data in thefirst alignment direction is higher than sharpness of the image data inthe second alignment direction, setting includes setting the correctionintensity such that the correction intensity for the image data havingthe variation amount in the first alignment direction is set to bestronger than the correction intensity for the image data having thevariation amount in the second alignment direction, wherein thresholdsof the variation amount define the predetermined correction intensity,such that correction intensity for the image data having the variationamount in the first alignment direction having higher sharpness is setto be stronger than correction intensity for the image data having thevariation amount in the second alignment direction having lowersharpness, and wherein the thresholds are values in a range between amaximum variation amount of the first alignment direction of pixels anda maximum variation amount of the second alignment direction of pixels,with respect to the predetermined pixel of the image data.